/**
  * @name 轮播组件
  * @description: 
  * @param 
  * @return 
  */ 

<template>
	<van-swipe class="my-swipe" :autoplay="autoPlay" indicator-color="white">
		<van-swipe-item v-for="item of datas.slides" :key="item.goodsId">
			<van-image :src="filterImageUrl(item.image)" lazy-load>
				<template v-slot:loading>
					<van-loading type="spinner" size="100" />
				</template>
				<template v-slot:error>加载失败</template>
			</van-image>
		</van-swipe-item>
	</van-swipe>
</template>

<script>
	export default {
		props: {
			datas: {
				type: Object,
				required: true
			},
			autoPlay: {
				type: Number,
				default: 3000
			}
		}
	}
</script>

<style lang="scss" scoped>
	@import "css/pages/home/swiper.scss";
</style>
